module.exports = {
  extends: [
    'stylelint-config-html/vue',
    'stylelint-config-recommended-vue/scss',
    "stylelint-config-recommended-scss",
    "stylelint-config-standard",
    "stylelint-config-standard-scss"
  ],
  plugins: ['stylelint-order'],
  customSyntax: 'postcss-scss',
  // 对于html文件使用自定义规格"postcss-html"解释
  overrides: [
    {
      "files": ["**/*.vue"],
      "customSyntax": "postcss-html"
    },
  ],
  rules: {
    "custom-property-empty-line-before": null,
    "rule-empty-line-before": null,
    "value-keyword-case": null,
    "at-rule-empty-line-before": null,
    "scss/dollar-variable-pattern": null,
    "scss/no-global-function-names": null,
    "selector-pseudo-class-no-unknown": [
      true,
      {
        ignorePseudoClasses: ["global","export"],
      }
    ],
    "property-no-unknown": null, //  允许位置属性
    "named-grid-areas-no-invalid": null,
    "no-descending-specificity": null,
    "font-family-no-missing-generic-family-keyword": null,
    "unit-no-unknown": [true, { ignoreUnits: ["rpx"] }],
    'no-empty-source': null, // 关闭禁止空源码
    'declaration-block-no-duplicate-properties': true,
    'no-invalid-double-slash-comments': null,
    // 不要使用已被 autoprefixer 支持的浏览器前缀
    'media-feature-name-no-vendor-prefix': true,
    'at-rule-no-vendor-prefix': true,
    'selector-no-vendor-prefix': true,
    'property-no-vendor-prefix': true,
    'selector-class-pattern': null, //不限制class类名格式
    'value-no-vendor-prefix': null, //不限制类似于display: -webkit-box;
    'import-notation': 'string', // 必须，使用@import url("")引入样式文件scss无法使用高级用法，https://stylelint.io/user-guide/rules/import-notation/
    'selector-pseudo-element-no-unknown': [true, {
      "ignorePseudoElements": ["v-deep"] // 此规则会禁用未知的伪元素选择器，ignorePseudoElements用来配置该校验规则忽略的为元素选择器 http://stylelint.docschina.org/user-guide/rules/selector-pseudo-element-no-unknown/
    }],
    'order/properties-order': [
      'position',
      'top',
      'right',
      'bottom',
      'left',
      'z-index',
      'display',
      'justify-content',
      'align-items',
      'float',
      'clear',
      'overflow',
      'overflow-x',
      'overflow-y',
      'margin',
      'margin-top',
      'margin-right',
      'margin-bottom',
      'margin-left',
      'padding',
      'padding-top',
      'padding-right',
      'padding-bottom',
      'padding-left',
      'width',
      'min-width',
      'max-width',
      'height',
      'min-height',
      'max-height',
      'font-size',
      'font-family',
      'font-weight',
      'border',
      'border-style',
      'border-width',
      'border-color',
      'border-top',
      'border-top-style',
      'border-top-width',
      'border-top-color',
      'border-right',
      'border-right-style',
      'border-right-width',
      'border-right-color',
      'border-bottom',
      'border-bottom-style',
      'border-bottom-width',
      'border-bottom-color',
      'border-left',
      'border-left-style',
      'border-left-width',
      'border-left-color',
      'border-radius',
      'text-align',
      'text-justify',
      'text-indent',
      'text-overflow',
      'text-decoration',
      'white-space',
      'color',
      'background',
      'background-position',
      'background-repeat',
      'background-size',
      'background-color',
      'background-clip',
      'opacity',
      'filter',
      'list-style',
      'outline',
      'visibility',
      'box-shadow',
      'text-shadow',
      'resize',
      'transition',
    ]
  }
}
